#!/bin/bash

build_dir="./build"

if [ $1 = "clean" ];then
    rm -rf $build_dir
    exit 0
fi

if [ $# -ne 1 ];then
    echo "Usage : ./build.sh + cmake tool chain file"
    echo "example : ./build.sh x86_64.cmake"
    exit 0
fi


if [ ! -d $build_dir ];then
    mkdir $build_dir
fi


(cd $build_dir && cmake -DCMAKE_TOOLCHAIN_FILE=$1 .. && make -j8)




